package com.jj.client;

import com.jj.fallback.UserClientFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

@Component
@FeignClient(
        value = "myproject",
        fallbackFactory = UserClientFallbackFactory.class
//        fallback = UserClientImpl.class
//        ,url = "http://localhost:9081"
)
public interface UserClient {
    @GetMapping(value = "/getInfo")
    String getInfo(@RequestParam("name") String name, @RequestParam("age") int age);
}